<template>
  <div class="messageBox">
      <header>
          <div class="return" @click="goback">
              <i class="iconfont icon-zuojiantou"></i>
          </div>
          <div class="title">我的消息</div>
      </header>
      <div class="nav">
          <ul>
              <li>交易物流</li>
              <li>通知</li>
              <li>互动</li>
          </ul>
      </div>
      <div class="main">
          <ul>
              <li v-for="(item, index) in messageList" :key="index">
                  <div class="left">
                      <i class="iconfont icon-xiaoxi_tongzhi"></i>
                  </div>
                  <div class="right">
                      <p> {{item.messageType}} </p>
                      <p> {{item.time}} </p>
                      <p class="content">
                          {{item.content}}
                      </p>
                  </div>
              </li>
          </ul>
      </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            messageList: [
                {
                    messageType: '宜居租房',
                    time: '14:32',
                    content: '恭喜你！ 预定的东城区-安外大街3号院1室一厅一卫-44㎡房源付款成功，期待你的入住。'
                },
                 {
                    messageType: '宜居租房更新通知',
                    time: '15:55',
                    content: '尊敬的客户，宜居租房即将推出2.0版本。新版本中添加了行程、钱包等丰富好玩的功能。'
                },
            ]
        }
    },
    methods: {
        goback() {
            this.$router.push('/home')
        }
    }

}
</script>

<style scoped lang='less'>
.messageBox {
    min-height: 1334px;
    // background-color: #ccc;
}
header {
    width: 100%;
    height: 88px;
    background-color: #ff5654;
    display: flex;
    .return {
        margin-left: 20px;
        i {
            color: #fff;
            font-size: 34px;
            line-height: 88px;
        }
    }
    .title {
        padding: 0 250px;
        color: #fff;
        font-size: 36px;
        line-height: 88px;
    }
}
.nav {
    height: 80px;
    box-shadow: 0 0 20px #ccc;
    ul {
        width: 100%;
        display: flex;
        li {
            flex: 1;
            text-align: center;
            line-height: 80px;
            font-size: 30px;
            color: #585858;
            &:nth-child(2) {
                color: #ff5555;
            }
        }
    }
}

.main {
    margin-top: 41px;
    ul {
        margin: 0 100px;
        li {
            box-shadow: 0 0 20px #ccc;
            margin-bottom: 20px;
            padding-bottom: 45px;
            display: flex;
            .left {
                width: 96px;
                display: flex;
                justify-content: center;
                margin-top: 35px;
                i {
                    display: block;
                    width: 60px;
                    height: 60px;
                    border-radius: 50%;
                    background-color: #ff5654;
                    color: #fff;
                    line-height: 60px;
                    text-align: center;
                    font-size: 38px;
                }
            }
            .right {
                margin-top: 35px;
                margin-right: 67px;
                flex: 1;
                p {
                    padding: 0;
                    margin: 0;
                    font-size: 24px;
                    line-height: 34px;
                }
                .content {
                    margin-top: 40px;
                }
            }
        }
    }
}



</style>